<?php
require_once "/controller/CityController.class.php";
require_once "/model/metadata/City.class.php";
include_once "viewHelper.php";


$request = $f3->get('REQUEST');

$city_id = $f3->get('PARAMS.cityId');
$city_name = $request["name"];
$city_population = $request["population"];
$city_country = $request["country"];

$city = new City($city_id, $city_name, $city_population, $city_country);

$city_controller = new CityController($link);

$city_controller->updateCity($city);

echo prepareResponse("200 OK", 200, null);
?>